Skip to main content

Synchronizing Timestamps

By default, publishers assign a value at the time the values are sent out. But Publishers and Data Flows all run separately, so you may need to condition timestamps in order to make parameters coming from a common source have the same value. Let’s look at how we accomplish this task.

Internal Timestamps

A default publisher uses Internal timestamps, which means the outgoing publications are stamped when they leave the publisher.

publisher

But that can lead to drifting timestamps across publishers or data flows. For example, if we have two identical data flows and use the MissionView Subscription Table set up to not fill holes,

full matrix

Then we only see values appear if they arrived with the associated timestamp. The two identical data flows use a separate domain for their publisher and read serial, decommutate, and publish values, all very simple. Here’s what we see in the table for the same decommutated field.

non synced

So even though the data source is the same, we get differing timestamps.

Timestamp Source

Publishers support changing the source of the timestamps. Let’s look at the data flow from the above example.

data-flow-example

We’re reading from a serial channel as the source of data. The arrival of data on the channel creates a timestamp of arrival and we can use that timestamp as our source.

First, let’s start in the Pull Reader. Edit the reader and select the Advanced tab, then provide a value for the Timestamp Output Name. The reader will create a parameter of that name with the timestamp of the data arrival.

pull reader advanced

Now connect the reader and the publishers.

connect timestamp source

Then edit each publisher and select the Advanced tab. For Timestamp Source, change the drop-down to use Input. For Input Name, select the timestamp parameter that’s coming from the reader.

timestamp setup

Click OK and save the changes to the data flow. We should see in the table that our timestamps now align.

synced timestamps

Note: If your data rate is high, you will always have correct timestamps, but some visual displays may expose the order in which values are received. For example, since publishers (and data flows) operate separately, you may receive publications spanning them out of timestamp-order.